package com.example.train.eurekaprovide.figen;

import com.example.train.eurekaprovide.entity.Job;
import com.example.train.eurekaprovide.figen.fallback.JobFigenBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "cloud-provide-job", fallback = JobFigenBack.class)
public interface JobFigen {

    /**
     * 根据JobID 获取JOB信息
     * @param id
     * @return
     */
    @GetMapping("/job/{id}")
    Job getJobInfoById(@PathVariable(value = "id") String id);
}
